package com.book.practise.service;

import com.book.practise.dao.BookDao;
import com.book.practise.medol.BookInfo;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-11-18
 * Time: 20:38
 */
public class BookService {
    public List<BookInfo> getList(){
        BookDao bookDao = new BookDao();
        List<BookInfo> bookInfos = bookDao.mockData();
        for(BookInfo bookInfo : bookInfos){
            if(bookInfo.getStatus() == 1){
                bookInfo.setStatusCN("可借阅");
            }else{
                bookInfo.setStatusCN("不可借阅");
            }
        }
        return bookInfos;
    }
}
